<?php 
        header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
        header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
        
	require ('../classes/HTMLManager.class.php');
        require ('../classes/EventManager.class.php');
        require ('../classes/HotnewsManager.class.php');
        require ('../classes/CinemaManager.class.php');
        require ('../classes/ArticleManager.class.php');
        
        $em = new EventManager();
?>
<!DOCTYPE html>
<html lang="it">
	<head>
		<?= HTMLManager::get_head_content() ?>
                <title>salesianichioggia.it :: Oratorio Salesiano di Chioggia</title>
                <style>
                    .fb-like-box {
                        background-color: #eaeaea;
                    }
                </style>
                
                <?= $em->get_events_styles() ?>
                
		<script type="text/javascript">
			$(document).ready(function(){
				$("#hotnews-carousel").carousel({
					interval: 6000
				});
				
				$("#cinema-carousel").carousel({
					interval: 5000
				});
                                
                                $("div#calendar div.event").popover({
					animation : true,
					placement : 'top',
					trigger : 'hover',
					content : 'Evento'
				});
			});
		</script>
	</head>
	<body>
            <div id="fb-root"></div>
            <script>(function(d, s, id) {
              var js, fjs = d.getElementsByTagName(s)[0];
              if (d.getElementById(id)) return;
              js = d.createElement(s); js.id = id;
              js.src = "//connect.facebook.net/it_IT/all.js#xfbml=1&appId=500245193327520";
              fjs.parentNode.insertBefore(js, fjs);
            }(document, 'script', 'facebook-jssdk'));
           </script>
                <?= HTMLManager::get_header() ?>
		<div class="container">
			<div class="row">
				<?php 
                                    $hm = new HotnewsManager();
                                    HTMLManager::get_hotnews($hm->get_visible_hotnews());
                                    
                                    $cm = new CinemaManager();
                                    HTMLManager::get_cinema($cm->get_cinema_projections());
                                ?>
			</div>
		</div>
		<div class="container">
			<div class="row">
                                <?php 
                                    $am = new ArticleManager();
                                    HTMLManager::get_last_articles($am->get_last_n_articles());
                                    
                                    
                                    HTMLManager::get_community_week($em->get_community_week_events());
                                ?>
				
			</div>
		</div>
		<footer>
			<div class="container">
				<div class="row">
						<div class="span3">
							<h3>Attività Recenti</h3>
							<ul>
								<li>
								<p>Pubblicato il nuovo sito!</p>
								</li>
							</ul>
						</div>
						<div class="span3">
							<h3>Tags Popolari</h3>
						</div>
						<div class="span3">
							<h3>Social Network</h3>
                                                        <div class="fb-like-box" data-href="https://www.facebook.com/pages/salesianichioggiait/143371202433312?fref=ts" data-width="270" data-height="470" data-show-faces="true" data-stream="false" data-header="true"></div>
						</div>
						<div class="span3">
							<h3>Siti amici</h3>
								<ul>
									<li><a href="http://www.donboscoland.it">www.donboscoland.it</a></li>
									<li><a href="http://www.oratoriosangiusto.com">Oratorio San Giusto - Porto Viro</a></li>
                                                                        <li><a href="http://www.sdb.org">www.sdb.org</a></li>
                                                                        <li><a href="http://www.salesianinordest.it">www.salesianinordest.it</a></li>
                                                                        <li><a href="http://www.db-service.org">DB Service</a></li>

								</ul>
						</div>
				</div>
			</div>
			<hr />
			<div class="container">
				<div class="row">
					<div class="span12">
						<h5>Istituto Salesiano San Marco - Oratorio Salesiano Chioggia - P. Iva: 02173980273 - C.F.: 82000110278</h5>
					</div>
				</div>
			</div>
		</footer>
		<script src="http://www.salesianichioggia.it/bootstrap/js/bootstrap-transition.js" type="text/javascript"></script>
		<script src="http://www.salesianichioggia.it/bootstrap/js/bootstrap-carousel.js" type="text/javascript"></script>
		<script src="http://www.salesianichioggia.it/bootstrap/js/bootstrap-tooltip.js" type="text/javascript"></script>
		<script src="http://www.salesianichioggia.it/bootstrap/js/bootstrap-popover.js" type="text/javascript"></script>
	</body>
</html>